<template>
	<view>
		<!-- 搜索 -->
		<!-- view.search>view.inputso>view.iconso+view.title -->
		<view class="search" @tap="opensoku" data-pages="/pages/soku/soku">
			<view class="inputso">
				<u-icon name="sousuo3" custom-prefix="custom-icon" size="40" color="#f1f2f6"></u-icon>
				<!-- <view class="iconso">&#xe60d;</view> -->
				<view class="title placeholder">搜索 {{placeholder}}</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name:"FatFatMeng-search",
		props:{
			// 输入框为空时占位符
			placeholder:{
				type:String,
				default:''
			}
		},
		data() {
			return {
				
			};
		},
		methods:{
			opensoku(e) {
				console.log(e.currentTarget.dataset.pages)
				let item = e.currentTarget.dataset.pages
				this.$emit('change',item)
			}
		}
	}
</script>

<style lang="scss" scoped>
	// @font-face {
	//   font-family: 'iconso';  /* Project id 2533409 */
	//   src: url('http://at.alicdn.com/t/font_2533409_1wco5knndep.woff2?t=1620408747497') format('woff2'),
	//        url('http://at.alicdn.com/t/font_2533409_1wco5knndep.woff?t=1620408747497') format('woff'),
	//        url('http://at.alicdn.com/t/font_2533409_1wco5knndep.ttf?t=1620408747497') format('truetype');
	// }
	.search {
		display: flex;
		justify-content: center;
		align-items: center;
		width: 750rpx;
		height: 100rpx;
		.inputso {
			flex-direction: row;
			display: flex;
			width: 690rpx;
			height: 80rpx;
			justify-content: center;
			align-items: center;
			background: rgba(255, 255, 255, .3);
			border-radius: 40rpx;
			.iconso {
				font-family: iconso;
				font-size: 40rpx;
			}
			.title {
				margin-left: 10rpx;
				font-size: 32rpx;
			}
		}
		
	}
</style>
